package com.lagou.sqlSession;
/*
 * PackageName: com.lagou.sqlSession
 * ClassName:
 * Author:   zhang
 * Date:     Created in 2020/9/29
 * Description:
 * History:
 * <author>        <time>             <version>          <desc>
 * 作者姓名         修改时间            版本号              描述
 * zhang           2020/9/29      1.0
 */

import java.util.List;

/**
 * Title:
 * Project: IPersistence_test
 *
 * @author ZhangKe
 * Created on 2020/9/29
 */
public interface SqlSession {

    //查询所有
    public <E> List<E> selectList(String statementId,Object... param) throws Exception;
    //查询单个
    public <T> T selectOne(String statementId,Object... param) throws Exception;

    public <E> E insert(String statementId, Object... param) throws Exception;

    public <E> E delete(String statementId, Object... param) throws Exception;

    public <E> E update(String statementId, Object... param) throws Exception;

    //为解决Dao层实现类重复配置获取数据库连接信息、SqlSessionFactory创建、StatementId硬编码问题，使用代理，为dao生成代理实现类
    public <T> T getMapper(Class<?> mapperClass);
}
